﻿package control
{
    import com.core.*;

    public class FlashTipsControl extends Control
    {

        public function FlashTipsControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "tips")
            {
                if (param2.property == "normal")
                {
                    if (param2.newvalue == null)
                    {
                    }
                    else if (param2.newvalue && param2.newvalue.hasOwnProperty("data"))
                    {
                        if (param2.newvalue.p)
                        {
                            this.target.show(param2.newvalue.data, param2.newvalue.p.x, param2.newvalue.p.y);
                        }
                        else
                        {
                            this.target.show(param2.newvalue.data, 0, 0);
                        }
                    }
                    else
                    {
                        this.target.show(param2.newvalue);
                    }
                }
                else if (param2.property == "state")
                {
                    if (param2.newvalue == "close")
                    {
                        this.target.hide();
                    }
                }
            }
            return;
        }// end function

    }
}
